package day06.bankAccount;

public class BankAccount {
    private int balance;

    public void setBalance(int m) {
        this.balance = m;
    }

    public BankAccount() {
        this.balance = 0;
    }

    public BankAccount(int balance) {
        this.balance = balance;
    }

    int getbalance() {
        return this.balance;
    }

    void withdraw(int m) {
        if (m > balance) {
            System.out.print("Insufficient balance.");
        } else balance -= m;
    }

    void deposit(int m) {
        balance += m;
    }
}
